/**
 * Copyright (C), 2015-2021, XXX有限公司
 * FileName: HelloController
 * Author:   AEO WUGUOZHI
 * Date:     2021/3/22 22:04
 * Description: controller  HelloWorld
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.bnuz.boot.controller;

import com.bnuz.boot.bean.Car;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 〈一句话功能简述〉<br> 
 * 〈controller  HelloWorld 我写了一个控制器，来处理请求〉
 *
 * @author AEO WUGUOZHI
 * @create 2021/3/22
 * @since 1.0.0
 */

//@ResponseBody
//@Controller
//HTTP请求
@RestController
//Slf4j 日志管理
@Slf4j
public class HelloController {
    //自动注入组件
    @Autowired
    Car car;

    @RequestMapping("/car")
    public Car car(){
        return car;
    }

    //映射请求
    @RequestMapping("/hello")
    public String  handle01(){
        log.info("请求进来了");
        return "Hello,Spring Boot 2!" + "你好鸭";
    }


}